#include "QWinMainForm.h"
#include "ui_QWinMainForm.h"

QWinMainForm::QWinMainForm(QWidget *parent) :
    QMainWindow(parent),
    ui(new Ui::QWinMainForm)
{

    ui->setupUi(this);
    setWindowFlags(Qt::Window | Qt::FramelessWindowHint | Qt::WindowSystemMenuHint |
                   Qt::WindowMinimizeButtonHint | windowFlags());
    FramelessHelper *pHelper = new FramelessHelper(this);
    pHelper->activateOn(this);  //激活当前窗体
    pHelper->setTitleHeight(30);  //设置窗体的标题栏高度
    pHelper->setWidgetMovable(true);  //设置窗体可移动
    pHelper->setWidgetResizable(true);  //设置窗体可缩放
    pHelper->setRubberBandOnMove(false);  //设置橡皮筋效果-可移动
    pHelper->setRubberBandOnResize(false);  //设置橡皮筋效果-可缩放
}

QWinMainForm::~QWinMainForm()
{
    delete ui;
}
